home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: gail.ripco.com!mambuhl
- From: mambuhl@ripco.com (Martin Ambuhl)
- Subject: Re: array[index]
- Message-ID: <DpL12A.DKA@rci.ripco.com>
- X-Nntp-Sender: mambuhl@golden.ripco.com
- Sender: usenet@rci.ripco.com (Net News Admin)
- Organization: Ripco Internet BBS Chicago
- Date: Tue, 9 Apr 1996 06:37:20 GMT
-
- ftlgeuse@dfw.dfw.net (Azazel Diabolus (aka Fetelgeuse)) in
- <4jiies$3bh@fnord.dfw.net> asks:
-
- >On my platform's assembly language a[n] is the same as n[a]; is this also
- >valid in C? Does array[index] give the same address as index[array]? I
- >will try this after I post it but I would like to know if this is
- >something defined by the ANSI standard. Thanks,
-
- a[n] =>
- *(a+n) == *(n+a)
- => n[a]
-
- From ISO 6.3.2:
- The definition of the subscript operator is that E1[E2] is
- identical to (*(E1+(E2))).
-
-
- --
- * Martin Ambuhl net: mambuhl@ripco.com
- * Chicago, IL (USA)
-